package com.twu.biblioteca;

import java.util.List;
import java.util.Scanner;

public class UserInterface {

    public void showWelcome() {
        System.out.println("Hello!");
    }

    public void showMenu() {
        System.out.println("Select an option: list | reserve | membership | quit");
    }

    public void showMembershipInfo() {
        System.out.println("Please talk to a Librarian. Thank you.");
    }

    public void showInvalidCommandMessage(String invalidCommand) {
        System.out.println("Select a valid option!!");
    }

    public void showReservationSucceededMessage() {
        System.out.println("Thank You! Enjoy the book.");
    }

    public void showReservationFailedMessage() {
        System.out.println("Sorry we don't have that book yet.");
    }

    public void showBookList(List<String> books) {
        for (int index = 0; index < books.size(); ++index) {
            System.out.println(String.format("#%d %s", index + 1, books.get(index)));
        }
    }

    public void prompt(String prompt) {
        System.out.println(prompt + " ");
    }

    public String nextInput() {
        Scanner scanner = null;
        scanner = new Scanner(System.in);
        return scanner.nextLine();
        /*
         * Scanner is intentionally NOT closed.
         */
    }

}
